import string, os
import datetime
import subprocess

print 'Running network test...'
trial = 50
now = datetime.datetime.now()
filename = "NetLoopback_%s.txt" % now.strftime("%Y-%m-%d-%H-%M")
#subprocess.Popen("NetServer")
for i in range(trial) :
	cmd = "NetClient >> %s" % (filename)
	os.popen(cmd)

print 'Done! Check results in %s' % filename